package com.et114.modules.commons;

import java.util.Calendar;

public class XLSDemo {
	public   static   void  main(String[] args)   {
        System.out.println( " 开始导出Excel文件 " );
        XLSExport e  =   new  XLSExport( "d:/test.xls" );
        
        e.createRow( 0 );
        e.setCell( 0 ,  " 编号 " );
        e.setCell( 1 ,  " 名称 " );
        e.setCell( 2 ,  " 日期 " );
        e.setCell( 3 ,  " 金额 " );
        e.createRow( 1 );
        e.setCell( 0 ,  1 );
        e.setCell( 1 ,  " 工商银行 " );
        e.setCell( 2 , Calendar.getInstance());
        e.setCell( 3 ,  111123.99 );
        e.createRow( 2 );
        e.setCell( 0 ,  2 );
        e.setCell( 1 ,  " 招商银行 " );
        e.setCell( 2 , Calendar.getInstance());
        e.setCell( 3 ,  222456.88 );
         try    {
            e.exportXLS();
            System.out.println( " 导出Excel文件[成功] " );
        }   catch  (Exception e1)   {
            System.out.println( " 导出Excel文件[失败] " );
            e1.printStackTrace();
        } 
    } 
	
}
